package com.todo.demo.Service;

import com.todo.demo.Model.*;
import org.springframework.stereotype.Service;

import javax.servlet.http.Part;
import java.util.HashMap;
import java.util.List;

@Service(value = "planAndTaskService")
public interface PlanAndTaskService {

    List< HashMap<String, Object>> findAllPlanWithTask(int pageNum, int pageSize, long userId);

    List<PlanWithTask> findPlanWithTaskByUserId(int pageNum, int pageSize, long userId);

    Plan finPlanByPlanId(long planId);
    PlanWithTask finTaskByTaskId(long taskId);
    long addPlan(Plan plan);
    long addTask(Task task);
    int setTaskCheckById(Task task);
    int deleteTaskById(PlanWithTask planWithTask);
    int deletePlanById(PlanWithTask planWithTask);
    int addUserToPlan(UserWithPlan userWithPlan);
    int updateTypeIdForPLan(Plan plan);
    List<Partner> getPartnerByPlanId(Partner partner);
    Partner isPartakeRepeat(Partner partner);
    long getTaskAiNum();
    long getPlanAiNum();
    int quitPartake(Partner partner);
    int updatePlanLastEditTime(Plan plan);
}